package control.ventana;

import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;

import javax.swing.JInternalFrame;

public class ControladorNoMover implements ComponentListener {

	
	private int posX;
	private int posY;
	
	public ControladorNoMover(int posX, int posY){
		//guardo las posiciones iniciales, asi no se puede mover de ahi =P
		this.posX = posX;
		this.posY = posY;
	}
	
	public void componentHidden(ComponentEvent arg0) {

	}

	public void componentMoved(ComponentEvent arg0) {
		JInternalFrame frame = (JInternalFrame)arg0.getSource();
		frame.setLocation(posX,posY);
	}

	public void componentResized(ComponentEvent arg0) {
		
	}

	public void componentShown(ComponentEvent arg0) {

	}

}
